import React, {Component} from 'react';
import BetterScroll from "better-scroll";

class App extends Component {
    state = {
        list: ["111", "222", "333", "444", "555", "666", "777", "888", "999", "111", "222", "333", "444"]
    }

    componentDidMount() {
        new BetterScroll("#wrapper");
    }

    render() {
        return <div>
            <div id="wrapper" style={{backgroundColor: "yellow", height: "200px", overflow: "hidden"}}>
                <ul>
                    {this.state.list.map((item, index) => {
                        return <li key={index}>{item}</li>
                    })}
                </ul>
            </div>
        </div>;
    }
}

export default App;